<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:ui="http://java.sun.com/jsf/facelets">
  <body>
    <ui:composition template="/WEB-INF/templates/segretario.xhtml">
      <ui:define name="titoloSottoSezione">
        Creazione Docente
      </ui:define>
      
      <ui:define name="contenuto">
        <h3>Dati del docente:</h3>
        
        <h:form>
        <table class="plainText">
          <tr>
            <td>Email:</td>
            <td>
              <h:inputText id="email" value="#{mainBean.segretario.docentiBean.nuovoDocente.docente.email}" validator="#{mainBean.validaEmail}" required="true"/>
            </td>
            <td><h:message for="email" style="color: red"/></td>
          </tr>
          <tr>
            <td>Nome:</td>
            <td><h:inputText id="nome" value="#{mainBean.segretario.docentiBean.nuovoDocente.docente.nome}" required="true"/></td>
            <td><h:message for="nome" style="color: red"/></td>
          </tr>
          <tr>
            <td>Cognome:</td>
            <td><h:inputText id="cognome" value="#{mainBean.segretario.docentiBean.nuovoDocente.docente.cognome}" required="true"/></td>
            <td><h:message for="cognome" style="color: red"/></td>
          </tr>
          <tr>
            <td>SSD:</td>
            <td><h:inputText id="ssd" value="#{mainBean.segretario.docentiBean.nuovoDocente.docente.ssd}" required="true"/></td>
            <td><h:message for="ssd" style="color: red"/></td>
          </tr>
          <tr>
            <td>Qualifica:</td>
            <td><h:inputText id="qualifica" value="#{mainBean.segretario.docentiBean.nuovoDocente.docente.qualifica}" required="true"/></td>
            <td><h:message for="qualifica" style="color: red"/></td>
          </tr>
          <tr>
            <td colspan="2"><h:commandButton value="Aggiungi docente" action="#{mainBean.segretario.docentiBean.nuovoDocente.creaDocente}" 
              style="width: 100%"/></td>
          </tr>
          <tr><td>NOTA: La password di accesso sar&agrave; AGGIUNGI...</td></tr>
        </table>
        </h:form>
      </ui:define>
    </ui:composition>
  </body>
</html>